package com.bigflexlib.x.com.adobe.net.URI
{
	import com.adobe.net.URI;
	
	import com.bigflexlib.core.comparison.result.ComparisonResult; import com.bigflexlib.core.comparison.result.ComparisonResults;
	import com.bigflexlib.core.comparison.simple.ISimpleComparator;

	public class URISimpleComparator implements ISimpleComparator
	{
		public function compare(value1:*, value2:*):ComparisonResult
		{
			// TODO... make sure URIs are normalized
			if ( !value1 is URI ) return ComparisonResults.DIFFERENT;
			if ( !value2 is URI ) return ComparisonResults.DIFFERENT;
			var eq:Boolean = (value1 as URI).toString() == (value2 as URI).toString();
			return eq ? ComparisonResults.EQUAL : ComparisonResults.DIFFERENT;
		}
		
	}
	
}